package demo2;



class MyArray2<T extends Comparable<T>>{
    T x1;
    T x2;
    public T getX2() {
        return x2;
    }

    public void setX2(T x2) {
        this.x2 = x2;
    }

    public T getX1() {
        return x1;
    }

    public void setX1(T x1) {
        this.x1 = x1;
    }


    void print(){
        System.out.println(x1.compareTo(x2));
    }
}

public class Test2 {
    public static void main(String[] args) {
        MyArray2<Integer> myArray2=new MyArray2<>();
        myArray2.setX1(1);
        myArray2.setX2(2);
        myArray2.print();
    }
}
